Skip to content

Conversation

prife
Copy link
Contributor

@prife prife commented Feb 2, 2015

test case

int testdir()
{
    DIR * dir;
    struct dirent * ptr;
    int offset = 0, offset_5 = 0, i = 0;
    dir = opendir("/");
    while ((ptr = readdir(dir))!=NULL)
    {
        offset = telldir(dir);
        if(++i == 5) offset_5 = offset;
        rt_kprintf("d_name :%s offset :%d \n", ptr->d_name, offset);
    }
    seekdir(dir, offset_5);
    rt_kprintf("Readdir again!\n");
    while ((ptr = readdir(dir))!=NULL)
    {
        offset = telldir(dir);
        rt_kprintf("d_name :%s offset :%d\n", ptr->d_name, offset);
    }

    closedir(dir);
    return 0;
}

@prife prife changed the title dfs_win32: add seekdir support, fix #364 dfs_win32: add seekdir support, fix #346 Feb 2, 2015
BernardXiong added a commit that referenced this pull request Feb 2, 2015
dfs_win32: add seekdir support, fix #346
@BernardXiong BernardXiong merged commit 1158fba into RT-Thread:master Feb 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants